#!/bin/sh
mypath=`dirname "$0"`
echo $1
myname=${0##*/}
echo ${myname}

ps -aef | grep -P "$1" | grep -Pv grep | grep -Pv $myname
ps -aef | grep -P "$1" | grep -Pv grep | grep -Pv $myname | grep -Po "^\S+\s+\d+" | grep -Po "\d+"
ps -aef | grep -P "$1" | grep -Pv grep | grep -Pv $myname | grep -Po "^\S+\s+\d+" | grep -Po "\d+" | xargs -r kill -2

